package cn.itcast.entity;


/**
 * 用户信息
 */
public class User {
    //# 用户ID（编号）:用户名:密码:电话:邮箱
    private int id;
    private String UserName;
    private String passWord;
    private String phone;
    private String email;

    public User() {
    }

    public User(int id, String passWord) {
        this.id = id;
        this.passWord = passWord;
    }

    public User(int id, String userName, String passWord, String phone, String email) {
        this.id = id;
        UserName = userName;
        this.passWord = passWord;
        this.phone = phone;
        this.email = email;
    }

    public int getId() {
        return id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        User user = (User) o;

        if (id != user.id) return false;
        return passWord != null ? passWord.equals(user.passWord) : user.passWord == null;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (passWord != null ? passWord.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return UserName;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUserName() {
        return UserName;
    }

    public void setUserName(String userName) {
        UserName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}